Delete containers in the XPS memory cache

When you update a vessel visit’s phase to Closed, delete a container, or merge a To be determined (TBD) unit with the actual unit, N4 sends an update to XPS to delete those containers and TBDs. However, XPS persists the containers in the XPS memory cache for reuse. If the containers are not reused, the containers remain in the XPS memory cache causing increased memory usage growth over time.

XPS provides a mechanism to delete containers persisted in the XPS memory cache through the XPS setting SYSFCM (on page 1). When you set SYSFCM to Y, containers in the XPS memory cache are deleted at periodic intervals, freeing the memory back to the operating system. The default value of this setting is N, which means that the containers in the XPS memory cache are not deleted.

Related settings:

The XPS setting SYSFCI (on page 1) determines the frequency in minutes for purging containers in the XPS memory cache that are marked for deletion.

The XPS setting SYSFCL (on page 1) enables debug logging related to container memory management. When you set SYSFCL to Y, XPS generates logs in the ‘log’ folder as mentioned under XPS Logs below. When you set SYSFCL to N, XPS still creates the folders and the log files in the respective folders, but updates the files only if SYSFCL is turned on. Navis >n4> developers use the logs to help with the development and debugging process.

How it works:

  1. When you update a vessel visit’s phase to Closed, delete a container, or merge a TBD unit with the actual unit, N4 sends information on containers that need to be deleted to XPS.

  1. XPS maintains a list of containers to be freed from the XPS memory cache. This list is updated continuously based on the updates received from N4. The containers marked for deletion are retained in the XPS memory cache for 2 hours before being deleted.

  2. XPS runs a background job every hour to delete containers from the XPS memory cache if SYSFCM is set to Y and based on the value defined for SYSFCI. XPS also deletes the associated entities, such as work instructions.

XPS Logs:

XPS creates the following folders in the ‘log’ folder.

Folder name

File name

CntrLLPrint

CntrLLPrint.log

ProcessDeletionList_Processing

ProcessDeletionList_Processing.log

TBDLLPrintPath

CNTRDELDBG_TBDLLPrint.txt

ZListNowPath

ZListNow.log

Example log message:

Based on the update received from N4, the container is added to the to-be-deleted container list. In this example, the container is added to the list at 13:24. The container will remain in the XPS cache for 2 hours and then deleted.

2018-02-05 13:24:55,519 INFO  | BridgePersisterInputThread | #DBObjectDeleteViaInterface(containers, CXRU1671838, 1929134154, 0 ); (man/ent/gkey/pkey) and then manager:key: 34:0

2018-02-05 13:24:55,519 WARN  | BridgePersisterInputThread | ~Container : Removing Clone WI for CXRU1671838 pkey=0.

2018-02-05 13:24:55,519 INFO  | BridgePersisterInputThread | StowEngineABC::cmdTrashItem - Adding CXRU1671838 container at 2018-02-05 13:24:55.519 to list for delete

2018-02-05 13:24:55,519 WARN  | BridgePersisterInputThread | ~Container : Removing Clone WI for CXRU1671838 pkey=0.

2018-02-05 13:24:56,780 INFO  | Cooperative Tasks | [BridgePersister(work.instructions)] Adding to transaction #531: UPDATE.REMOVE object: [WORK_EXECUTION 'CXRU1671838 OTHR Planned EC Y 1 1.000000' 1929135424:-212422112{1}XPS(10.43.129.163)[email protected]]

2018-02-05 13:24:56,780 INFO  | Cooperative Tasks | [BridgePersister(work.instructions)] Adding to transaction #531: UPDATE.REMOVE object: [WORK_INSTRUCTION 'CXRU1671838 OTHR Planned EC Y 1 1.000000' 1929135424:-212422112{1}XPS(10.43.129.163)[email protected]]

Background job is run at 13:32. Container added to the list at 13:24 is not deleted from the XPS cache unless after 2 hours from the time it is added to the list.

2018-02-05 13:32:15,907 INFO  | Cooperative Tasks | ContainerFreeTask::ProcessDeletionList checking container CXRU1671838 for deletion, he died at 2018-02-05 13:24:55.519 and the time now is 2018-02-05 13:32:15.907

2018-02-05 13:32:15,907 INFO  | Cooperative Tasks | ContainerFreeTask::isContainerReadyForDelete container CXRU1671838 has not stayed for LENGTH_OF_STAY_FOR_DEAD_CONTAINERS and is has only stayed for 440388ms!

2018-02-05 13:32:15,907 INFO  | Cooperative Tasks | ContainerFreeTask::ProcessDeletionList NOT deleting container CXRU1671838, since its not ready for delete

Background job is run at 14:32. Container added to the list at 13:24 is not deleted from the XPS cache unless after 2 hours from the time it is added to the list.

2018-02-05 14:32:15,881 INFO  | Cooperative Tasks | ContainerFreeTask::ProcessDeletionList checking container CXRU1671838 for deletion, he died at 2018-02-05 13:24:55.519 and the time now is 2018-02-05 14:32:15.881

2018-02-05 14:32:15,881 INFO  | Cooperative Tasks | ContainerFreeTask::isContainerReadyForDelete container CXRU1671838 has not stayed for LENGTH_OF_STAY_FOR_DEAD_CONTAINERS and is has only stayed for 4040362ms!

2018-02-05 14:32:15,881 INFO  | Cooperative Tasks | ContainerFreeTask::ProcessDeletionList NOT deleting container CXRU1671838, since its not ready for delete

Background job is run at 15:32. Container added to the list at 13:24 is deleted from the XPS cache because it has crossed the 2 hour retention time.

2018-02-05 15:32:16,202 INFO  | Cooperative Tasks | ContainerFreeTask::ProcessDeletionList checking container CXRU1671838 for deletion, he died at 2018-02-05 13:24:55.519 and the time now is 2018-02-05 15:32:16.202

2018-02-05 15:32:16,202 INFO  | Cooperative Tasks | ContainerFreeTask::ProcessDeletionList container CXRU1671838 is ready for deletion

2018-02-05 15:32:16,202 INFO  | Cooperative Tasks | ContainerFreeTask::ProcessDeletionList deleting(freeing memory) of container previously named CXRU1671838 present at address 000000D3D61CD440 at time 2018-02-05 15:32:16.202